colorbutton: Don't add a customize menu
authorMatthias Clasen <mclasen@redhat.com>
Fri, 3 Apr 2020 21:42:22 +0000 (17:42 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 4 Apr 2020 04:28:52 +0000 (00:28 -0400)
The color swatch in the button does not need a
context menu. Turn it off.

gtk/gtkcolorbutton.c

index 13dbc36c79740ea30a6c62f287e37021872bc9ac..76048eb185f001690b877c2946d84e14653c008f 100644 (file)
@@ -266,6 +266,7 @@ gtk_color_button_init (GtkColorButton *button)
 
   priv->swatch = gtk_color_swatch_new ();
   gtk_widget_set_can_focus (priv->swatch, FALSE);
+  g_object_set (priv->swatch, "has-menu", FALSE, NULL);
   layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");
   pango_layout_get_pixel_extents (layout, NULL, &rect);
   g_object_unref (layout);